#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<sys/wait.h>
int main(){
	pid_t id = 	fork();
	if(!id){
		printf("my child my id : %d \n",getpid());
		exit(10);
	}
	int status = 0;
	id = waitpid(id,&status,0) ;
	printf("wait success child id: %d sig: %d exit code: %d \n",id,status & 0x7F,(status >> 8) & 0xFF); 
	return 0; 

}
